package com.young.ysepay.controllers;

import com.young.ysepay.service.YsPayQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author Vincentxin
 * @Date 2019-06-28
 */
@RestController
@RequestMapping("/ysPayQuery")
public class YsPayQueryController {
    @Autowired
    private YsPayQueryService ysPayQueryService;

    /**
     * 通过out_trade_no或者trade_no 查询支付信息
     * @param reqparam
     * @return
     */
    @PostMapping()
    public Map<String,Object> ysPayQuery(@RequestParam Map<String,String> reqparam){
        return ysPayQueryService.ysPayQuery(reqparam);
    }

}
